package org.rcgwt.sample.client.fieldset;

import org.rcgwt.client.ui.panels.FieldSet;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.TextBox;

/**
 * FieldSet example.
 * 
 * @author Didier MOISE
 */
public class FieldSetExample implements EntryPoint {

	@Override
	public void onModuleLoad() {
		FieldSet fieldset = new FieldSet();
		fieldset.setTitle("FieldSet title");

		fieldset.add(createContent());

		RootPanel.get().add(fieldset);
	}

	/**
	 * Create a content panel.
	 * 
	 * @return
	 */
	private Panel createContent() {
		FlowPanel panel = new FlowPanel();

		Label label = new Label("Nom : ");
		panel.add(label);
		TextBox textbox = new TextBox();
		panel.add(textbox);

		return panel;
	}
}
